package com.lyf.boot.modules.index.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.extra.mail.MailUtil;
import com.lyf.boot.core.model.R;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 邮件接口
 * @author Luyufan
 * @date 2024/1/9 11:29
 **/
@RestController
@RequestMapping("email")
@RequiredArgsConstructor
public class EmailController {

    @SaIgnore
    @PostMapping("/sender")
    public R<Void> sender(){
        MailUtil.sendText("761559274@qq.com","测试邮件","测试邮件内容");
        return R.ok();
    }
}
